package com.example.depcontrol.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;

@Data
@AllArgsConstructor
public class Result {
    public Integer code;//响应码：1成功 0失败
    public String msg;//提示信息
    public Object data;//数据 data

    public static Result success(Object data){
        return new Result(1, "success", data);
    }
    public static Result success(){
        return new Result(1, "success", null);
    }

    public static Result error(String msg){
        return new Result(0, msg, null);
    }
}
